import 'package:flutter_benchu/utils/commonPkg.dart';
import './route_handlers.dart';

class Routes {

  //***************************** 主要路由 ****************************//

  static String tab =                      "/";                                 //tab主页
  static String webView =                  "/webView";                          //webView

  //***************************** 练习相关 ****************************//

  static String eventDemo =                "/demos/eventDemo";                  //事件demo页面
  static String routerDemo =               "/demos/routerDemo";                 //路由相关demo页面
  static String routerDetailsDemo =        "/demos/routerDetailsDemo";          //路由相关详情页demo页面
  static String languageDemo =             "/demos/languageDemo";               //国际化相关demo页面
  static String aptDemo =                  "/demos/aptDemo";                    //屏幕适配相关demo页面
  static String apiDemo =                  "/demos/apiDemo";                    //请求接口相关demo页面
  static String cacheDemo =                "/demos/cacheDemo";                  //本地缓存demo页面
  static String getwidgetDemo =            "/demos/getwidgetDemo";              //组件库
  static String scannerDemo =              "/demos/scannerDemo";                //扫码
  static String sendNativeDemo =           "/demos/SendNativeDemo";             //与原生交互
  
  // 设置路由
  static void configureRoutes(FluroRouter router) {
    router.define(tab,handler: tabHandler, transitionType: TransitionType.fadeIn);
    router.define(webView,handler: webViewPageHandler, transitionType: TransitionType.fadeIn);
    router.define(eventDemo,handler: eventDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(routerDemo,handler: routerDemoPageHandler, transitionType: TransitionType.inFromRight);
    router.define(routerDetailsDemo,handler: routerDetailsDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(languageDemo,handler: languageDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(aptDemo,handler: aptDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(apiDemo,handler: apiDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(cacheDemo,handler: cacheDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(getwidgetDemo,handler: getwidgetDemoPageHandler, transitionType: TransitionType.fadeIn);
    router.define(scannerDemo,handler: scannerHandler, transitionType: TransitionType.nativeModal);
    router.define(sendNativeDemo,handler: sendNativeDemoPageHandler, transitionType: TransitionType.nativeModal);
  }
}
